# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-editorconfig
_pkgname=EditorConfig
pkgver=0.12.2
pkgrel=5
pkgdesc='File Locator and Interpreter for Python.'
url='https://pypi.org/project/editorconfig/#files'
arch=('any')
license=('PSF')
depends=('python2')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('15648904683e04b68966651ebf2046b60473a47a408dff257d64d06b6c0cc6765882ebf5ec0e0ccaf5dc7e78e93b5f9bdf129ae0e2a23f7f489cb50c9ae3ff16')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  mv "$pkgdir/usr/bin/editorconfig" "$pkgdir/usr/bin/editorconfig2"
}

